package com.dkd.sbtz.service;

import java.util.List;
import com.dkd.sbtz.domain.AssetMtplan;
import com.dkd.sbtz.domain.AssetMtplanSpare;
import com.dkd.sbtz.domain.mtplan.MtplanSpareHistoryVO;
import com.dkd.sbtz.domain.plando.MtPlanDetailVO;
import com.dkd.sbtz.domain.plando.MtPlanListRow;
import com.dkd.sbtz.domain.plando.MtPlanQueryReq;
import com.dkd.sbtz.domain.plando.PageResult;
import com.dkd.sbtz.domain.vo.MtPlanCreateReq;
import com.dkd.sbtz.domain.vo.PlanQuery;
import com.dkd.sbtz.domain.vo.spare.SpecialItemDTO;

/**
 * 设备计划维护Service接口
 * 
 * @author xzj
 * @date 2025-09-19
 */
public interface IAssetMtplanService 
{

    /** 列表（按 assetId 等条件） */
    List<AssetMtplan> selectAssetMtplanList(AssetMtplan query);

    /** 详情（含 spares） */
    AssetMtplan selectAssetMtplanDetail(Long planId);

    /** 新增（可带 spares） */
    int insertAssetMtplan(AssetMtplan po);

    /** 修改主表 */
    int updateAssetMtplan(AssetMtplan po);

    /** 逻辑删除 */
    int deleteAssetMtplanByIds(Long[] ids);

    /** 全量替换备件（编辑用，先删后插） */
    void replacePlanSpares(Long planId, List<AssetMtplanSpare> spares);

    List<AssetMtplanSpare> selectPlanSpares(Long planId);

    int updatePlanFields(AssetMtplan po);


    List<MtplanSpareHistoryVO> selectHistory(Long assetId, Long planId, String keyword, String beginTime, String endTime);

    public Long createPlan(AssetMtplan dto);
    int deletePlanCascade(Long[] ids);


    void replacePlanSpecialSpares(Long planId, List<SpecialItemDTO> items);
}
